console.log(__dirname);
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');

module.exports={
    entry:{
        entryKey:'./src/index.js'
    },
    output:{
        path:path.resolve(__dirname,'dist'),
        filename:'bundle.js'
    },
    mode: 'development',
    plugins: [
      new CleanWebpackPlugin(['./dist']),
      new HtmlWebpackPlugin({
        filename:'index.html',
        template: './index.html'
      })
    ]
}